import React, { Component } from "react";
import LinkButton from "../../../components/link-button";
import { Table } from "antd";
class sites extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
    const dataSource = [
      {
        key: "1",
        name: "快速漏洞扫描",
        sum: 294,
        sos: 85,
        tall: 79,
        in: 48,
        low: 29,
        message: 53,
        desc: "default",
        handle: "查看",
      },
      {
        key: "2",
        name: "全部漏洞扫描",
        sum: 156,
        sos: 0,
        tall: 109,
        in: 19,
        low: 26,
        message: 2,
        desc: "ALL",
        handle: "查看",
      },
      {
        key: "3",
        name: "自动化渗透扫描",
        sum: 338,
        sos: 0,
        tall: 279,
        in: 14,
        low: 37,
        message: 8,
        desc: "getshell",
        handle: "查看",
      },
    ];

    const columns = [
      {
        title: "策略组名称",
        dataIndex: "name",
        key: "name",
      },
      {
        title: "策略总数",
        dataIndex: "sum",
        key: "sum",
      },
      {
        title: "紧急",
        dataIndex: "sos",
        key: "sos",
      },
      {
        title: "高",
        dataIndex: "tall",
        key: "tall",
      },
      {
        title: "中",
        dataIndex: "in",
        key: "in",
      },
      {
        title: "低",
        dataIndex: "low",
        key: "low",
      },
      {
        title: "信息",
        dataIndex: "message",
        key: "message",
      },
      {
        title: "描述",
        dataIndex: "desc",
        key: "desc",
      },
      {
        title: "操作",
        dataIndex: "handle",
        key: "handle",
        render: (text) => <LinkButton>{text}</LinkButton>,
      },
    ];
    return (
      <>
        <Table dataSource={dataSource} columns={columns} />
      </>
    );
  }
}

export default sites;
